<?php
include("../function.php");
condb();

$lesson=mysql_fetch_assoc(mysql_query("select * from lesson where lesson_id='$_POST[lesson_id]'"));
$stop=strtotime($lesson['exam_stop']);
$now=time();
$timeout=$stop-$now;
echo $timeout;
?>